﻿#pragma once
#pragma execution_character_set("utf-8")
// 本文件为utf-8 编码格式

#ifndef __GD__DelegateClassDefine__
#define __GD__DelegateClassDefine__

#include "CrossApp.h"
#include "GdDefine.h"

// delegate 类定义


class UserLoginDelegate{
public:
	virtual void onActionPerformed(LoginAction action) = 0;
};

/* 商品代理类 */
class GDGoodsDelegate
{
public:
	virtual ~GDGoodsDelegate(){};
	/* 获取上一个商品的id */
	virtual std::string getBeforeGoodsId(std::string goodsId){ return ""; };
	/* 获取上一个商品的id */
	virtual std::string getBeforeGoodsId(int index){ return ""; };
	/* 获取下一个商品的id */
	virtual std::string getNextGoodsId(std::string goodsId){ return ""; };
	virtual std::string getNextGoodsId(int index){ return ""; };
	virtual void openGoods(std::string goodsId,int type=0){  };
	virtual void openGoodsByListIndex(int index, int type = 0){  };
};

class GDClippingImageDelegate
{
public:
	virtual ~GDClippingImageDelegate(){};
	/* 裁剪成功 */
	virtual void onClippingFinished(CAImage *newImage){};
	/* 裁剪取消 */
	virtual void onClippingCancel(){};
};

// 标签编辑界面的委托
class GDGoodsGrabMarkEditDelegate
{
public:
	virtual ~GDGoodsGrabMarkEditDelegate(){};
	/* 标签编辑完成 */
	virtual void onGoodsGrabMarkEditFinished(GDGoodsGrabMark* goodsGrabMark){};
};

// 单个标签的委托
class GDGoodsGrabMarkItemDelegate
{
public:
	virtual ~GDGoodsGrabMarkItemDelegate(){};
	/* 点击单个标签事件 */
	virtual void onGoodsGrabMarkItemClick(GDGoodsGrabMark* goodsGrabMark){};
};

/* 选择标签代理 */
class GDSelectMarkDelegate
{
public:
	virtual ~GDSelectMarkDelegate(){};
	/* 选择标签完成事件 */
	virtual void onSelectMarkFinished(list<GdBean> selectMarks){};
};

/* 发送评论代理 */
class GDSendCommentDelegate
{
public:
	virtual ~GDSendCommentDelegate(){};
	/*  */
	virtual void onSendCommentFinished(GDComment& comment){};
	virtual void onDeleteCommentFinished(GDComment& comment){};
	virtual void onReplyCommentBtnClick(){};
	virtual void onDeleteCommentBtnClick(){};
};

#endif /* defined(__GD__DelegateClassDefine__) */